/*访问后台的代码*/
layui.define([], function(exports) {
    var api={
            updateCpTaskSetup:function(form,callback){
                Lib.submitForm("/evaluation/cpTaskSetup/update.json",form,{},callback)
            },
            saveForm:function(isNew,form,callback){
                var postUrl = "/evaluation/cpTaskSetup/update.json";
                if (isNew) {
                    postUrl = "/evaluation/cpTaskSetup/add.json";
                }
                Lib.submitFileForm(postUrl,form,{},callback)
            },
            del:function(ids,callback){
                Common.post("/evaluation/cpTaskSetup/delete.json",{"ids":ids},function(){
                    callback();
                })
            }
            ,
            // check:function(id,callback){
            //     alert(id);
            //     var data = Common.getOneFromTable(table, "questionTable");
            //     if (data == null) {
            //         return;
            //     }
            //     window.parent.addTab1(data.questionId+"回答管理","./evaluation/cpTaskSetup/check.do?questionId="+data.questionId,"resChapter"+data.questionId);
            //     Common.post("/evaluation/cpTaskSetup/check.json",{"id":id},function(){
            //         callback();
            //     })
            // }
            // ,
        process:function(taskId,callback){
                Common.post("/evaluation/cpTaskSetup/excel/process.json", {"taskId":taskId}, function(fileId) {
                    callback(fileId);
                })
            }
            ,
        result:function(taskId,callback){
            Common.post("/evaluation/cpTaskSetup/excel/result.json", {"taskId":taskId}, function(fileId) {
                callback(fileId);
            })
        }
		
    };
    exports('cpTaskSetupApi',api);
});